{extend name="public/basic"}
{block name="main"}
<form action="{:url('/home/level/listorder')}" class="ajax" method="POST">
    <button class="layui-btn layui-btn-success" type="submit">排序</button>
    {auth:button rule="home/level/add" rules="$buttons"}
        <button type="button" class = "layui-btn layui-btn-success" action="dialog" action-url="{:url('add')}" action-title="新增等级">新增</button>
    {/auth:button}
    <table class="layui-table">
        <thead>
            <tr>
                <th style = "width:72px;">排序</th>
                <th>等级名称</th>
                <th>消费额度</th>
                <th>折扣率</th>
                <th>等级描述</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {volist name='list' id='v'}
            <tr>
                <td>
                <input type="hidden" name="id[]" value="{$v.level_id}">
                <input type="text" name="order[]" value="{$v.listorder}" class="layui-input">
                </td>
                <td>{$v.level_name}</td>
                <td>{$v.amount}</td>
                <td>{$v.discount}%</td>
                <td>{$v.description}</td>
                <td>
                    {auth:button rule="home/level/edit" rules="$buttons"}
                    <i action="dialog" action-url="{:url('home/level/edit', 'id='.$v['level_id'])}" class="layui-icon layui-icon-edit"></i>
                    {/auth:button}
                    {auth:button rule="home/level/del" rules="$buttons"}
                    <i class="layui-icon layui-icon-delete" action="del" action-url="{:url('del',['id'=>$v['level_id']])}"  title="删除"></i>
                    {/auth:button}
                </td>
            </tr>
            {/volist}
        </tbody>
        <!-- tbody是必须的 -->
    </table>

</form>

{/block}
